package chartCraft.model;

import java.io.Serializable;
import java.util.Observable;
import java.util.Observer;

public abstract class Model extends Observable implements Serializable{

	private transient Observer graphViewObserver;
	
	public void addGraphViewObserver(Observer obs) {
		graphViewObserver = obs;
		addObserver(obs);
	}
	
	public static class NotifyingMessage {
		private final String mAction;
		private final Object mObject;
		
		NotifyingMessage(String action, Object object) {
			mAction = action;
			mObject = object;
		}

		public String getAction() {
			return mAction;
		}

		public Object getObject() {
			return mObject;
		}
	}
}



